<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <form name="form1" target="_blank" action="http://www.bing.com">
        <input type="text">
        <button type="submit">提交</button>
        <input type="submit" value="提交">
    </form>
    <script>
        /*
            绑定对象是from
            触发方式
            默认行为
        */
        document.form1.onsubmit = function (e) {
            e.preventDefault();
            console.log('onsubmit');
        }





    </script>
</body>

</html>